import java.util.Scanner;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class Main {
    public synchronized static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        String k[] = new String[103];
        for (int i = 0; i < 101; i++) {
            k[i] = scanner.nextLine();
        }

        for (int i = 0; i < 101; i++) {
            k[i] = k[i].replaceAll("Wz|w", "万");
            if (!k[i].contains("万")) {
                if (k[i].length() < 5) {
                    k[i] = k[i] + "万";
                } else {
                    double integer = Double.parseDouble(k[i]);
                    k[i] = ((int) (integer / 10000)) + "万";
                }
            }
        }

        for (String s : k) {
            System.out.println(s);
        }
    }

    private void testCopyOnWriteArrayList(){
        Lock lock = new ReentrantLock();
        lock.lock();
    }
}
